
package stateframework_particle.view.controls.data;

import particle.core.platform.Platform;
import particle.core.tools.PropertySet;
import particle.core.view.CoreResources;
import particle.core.view.controls.Container;
import particle.core.view.controls.Control;
import particle.core.view.controls.IControlData;
import stateframework_particle.view.StateFramework_ParticleResources;
import stateframework_particle.view.controls.StateFramework_ParticlePanel;

/**
 * !!! This file was automatically generated, do not modify!
 * @restricted
 */
public class StateFramework_ParticlePanelData implements IControlData
{
    private StateFramework_ParticlePanel m_topLevel = null;

    public StateFramework_ParticlePanelData(StateFramework_ParticlePanel p_topLevel)
    {
        m_topLevel = p_topLevel;
        //@BEGIN CTOR

        //@END CTOR
    }
    
    public void createChildren()
    {
        //@BEGIN CREATE CHILDREN

        //@END CREATE CHILDREN
    }
    
    public void destroyChildren()
    {
        //@BEGIN DESTROY CHILDREN

        //@END DESTROY CHILDREN
    }
    
    public void getDefaultProperties(PropertySet p_properties)
    {
        getProperties(m_topLevel, p_properties);
    }
    
    public void getProperties(Control p_control, PropertySet p_properties)
    {
        String screenType = Platform.getInstance().getScreenType().toString().toLowerCase();
        p_control.getStyleProperties(getStyleName(p_control), p_properties);
        
        //@BEGIN GET PROPERTIES
        if ("touch_480x320".equals(screenType))
        {
            if (p_control == m_topLevel)
            {
                p_properties.setPropertyInt("bgColor", 0xffffffff);
                p_properties.setPropertyBool("visible", true);
                p_properties.setPropertyFloat("percentHeight", 100f);
                p_properties.setPropertyFloat("percentWidth", 100f);
                p_properties.setPropertyInt("y", 0);
                p_properties.setPropertyInt("x", 0);
                return;
            }
            return;
        }
        //@END GET PROPERTIES
    }
    
    private String getStyleName(Control p_control)
    {
        String screenType = Platform.getInstance().getScreenType().toString().toLowerCase();
        //@BEGIN GET STYLE NAME
        if ("touch_480x320".equals(screenType))
        {
            return null;
        }
        //@END GET STYLE NAME
        
        return null;
    }
}
